// 检查用户是否已经登录的组件
var app2 = new Vue({
    el: "#top",
    data: {
        user_id: -1,
        user_name: ''
    },
    methods: {

    },
    mounted: function() {
        instance({
            method: 'get',
            url: 'api/user/getIdBySession',

        }).then(res => {
            this.user_id = res.data.data.user_id
            this.user_name = res.data.data.user_name

        }).catch(err => {
            console.log(err);
        })
    }
})